package com.jiutong.meipengdai.ui.activitys;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.jiutong.meipengdai.R;
import com.jiutong.meipengdai.base.BaseActivity;

/**
 * Created by suxi on 2017/8/17.
 */


public class WebActivity extends BaseActivity implements View.OnClickListener {

    private String webUrl;
    private RelativeLayout rlBack;

    @Override
    public int getLayoutResouceId() {
        return R.layout.activity_webview;
    }

    @Override
    protected void initDate(Bundle savedInstanceState) {
        super.initDate(savedInstanceState);
        webUrl = getIntent().getExtras().getString("webUrl");
    }

    @Override
    protected void initView() {
        super.initView();

        WebView webView = (WebView) findViewById(R.id.webview);
        rlBack = (RelativeLayout) findViewById(R.id.rl_back);
        TextView title = (TextView) findViewById(R.id.tv_title);
        webView.loadUrl(webUrl);
    }

    @Override
    protected void initEvent() {
        super.initEvent();
        rlBack.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.rl_back:
                finish();
                break;
        }
    }
}
